import os


def getFileExten(fileName):
    return os.path.splitext(fileName)[-1][1:]


def delBytes(path):
    lists = os.listdir(path)
    for fileName in lists:
        fullName = path + "/" + fileName
        if os.path.isdir(fullName):
            delBytes(fullName)
        else:
            if getFileExten(fullName) == "bytes":
                print(fullName)
                os.remove(fullName)


if (__name__ == "__main__"):
    delBytes("E:/mmorpg/Assets/LuaScripts")
    pass
